package com.yuchen.bearrecord.dto;

import com.yuchen.bearrecord.entity.User;
import lombok.Data;

import java.time.LocalDate;

@Data
public class UserOpenidDto {
    private String openid;
    private LocalDate createtime;
    private Integer type;

    public UserOpenidDto(User user){
        this.openid = user.getOpenid();
        this.type = user.getType();
        this.createtime = user.getCreatetime().toLocalDateTime().toLocalDate();
    }
}

